Controlling asynchronous tasks

ABSTRACT

Controlling asynchronous tasks in a transaction system. A request to start an asynchronous child task is obtained, and a resource status of the system is determined. It is determined whether to suspend a parent task associated with the asynchronous child task or to execute the asynchronous child task based on the determined resource status of the system.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of co-pending U.S. patent applicationSer. No. 15/726,600, filed Oct. 6, 2017, entitled “CONTROLLINGASYNCHRONOUS TASKS,” which is hereby incorporated herein by reference inits entirety.

STATEMENT REGARDING PRIOR DISCLOSURES BY THE INVENTOR OR A JOINTINVENTOR

The following disclosure(s) are submitted under 35 U.S.C. 102(b)(1)(A):

DISCLOSURE(S): CICS open beta Dec. 23, 2016; CICS TS 5.4

BACKGROUND

One or more aspects of the present invention relate to controllingasynchronous tasks in transaction systems.

Transaction systems, such as enterprise transaction processing systems,often run tens of thousands of tasks in parallel. Ensuring the stabilityof a transaction system so that it can process and maintain thethroughput and the response time is therefore an importantconsideration. This is particularly the case for a transaction systememploying asynchronous applications, in which a parent task executes oneor more child tasks.

For example, a system may be flooded with child tasks which may thencause the parent task(s) to wait a long time for a response and/orprevent other applications from being able to start. To relieve thesystem from such a situation, the system administrator typically has tomanually intervene, and thus, spend a large amount of time to determineand cancel the blocking tasks.

SUMMARY

Shortcomings of the prior art are overcome and additional advantages areprovided through the provision of a computer-implemented method ofcontrolling asynchronous tasks in a system. The computer-implementedmethod includes, for instance, obtaining a request to start anasynchronous child task. A resource status of the system is determined.A determination is made as to whether to suspend a parent taskassociated with the asynchronous child task or to start the asynchronouschild task based on the resource status of the system.

Computer program products and systems relating to one or more aspectsare also described and claimed herein.

Additional features and advantages are realized through the techniquesdescribed herein. Other embodiments and aspects are described in detailherein and are considered a part of the claimed aspects.

BRIEF DESCRIPTION OF THE DRAWINGS

Embodiments of the present invention will now be described, by way ofexample only, with reference to the following drawings, in which:

FIG. 1 depicts a pictorial representation of an example distributedsystem in which aspects of the illustrative embodiments may beimplemented;

FIG. 2 is a block diagram of an example system in which aspects of theillustrative embodiments may be implemented;

FIG. 3 is a simplified block diagram of a control system according to anembodiment;

FIG. 4 is one example of a flow diagram of a method according to anembodiment, in which the method determines whether to suspend a parenttask or allow it to start its asynchronous child task;

FIG. 5 is one example of a flow diagram of a process for resumingsuspended tasks that may be employed in a method according to anembodiment; and

FIG. 6 illustrates a system according to an embodiment.

DETAILED DESCRIPTION

It should be understood that the figures are merely schematic and arenot drawn to scale. It should also be understood that the same referencenumerals are used throughout the figures to indicate the same or similarparts.

In the context of aspects of the present application, where embodimentsof aspects of the present invention constitute a method, it should beunderstood that such a method is a process for execution by a computer,i.e. is a computer-implementable method. The various steps of the methodmay therefore reflect various parts of a computer program, e.g. variousparts of one or more algorithms.

Also, in the context of aspects of the present application, a system maybe a single device or a collection of distributed devices that areadapted to execute one or more embodiments of the methods of aspects ofthe present invention. For instance, a system may be a personal computer(PC), a server, or a collection of PCs and/or servers connected via anetwork, such as a local area network, the Internet, and so on, tocooperatively execute at least one embodiment of the present invention.

Provided herein is a capability for controlling asynchronous tasks in atransaction system, such as child tasks of parent tasks that alreadyexist (i.e., are already running or being executed) in the system. Bydetermining whether to suspend a running (parent) task before it startsa child task based on a status of one or more resources of the system,embodiments may provide an autonomic control method that does notrequire the intervention of a system administrator.

For example, analysis of available resource(s) may be undertaken when atask is already running in the system and this task (e.g., a parenttask) wants to start one or more child tasks. In this way, an autonomiccontrol method to control the parent task so it only starts the childtask when the system is not overloaded may be provided. Thus, if thesystem is overloaded, the parent task may be suspended and queued untilthe system's load is decreased to a certain level (e.g., a predeterminedlevel that permits or enables the child task to be executed withoutcreating delays).

The parent task may be an existing task that is running in the system,and the child task may be a task that is associated with the parent taskso that there is provided a parent-child relationship between the task.By way of example, the parent task may be a task of a client applicationthat is executed by the system, and the child task may be started by theparent task, by another task of the client application, or by anotherclient application. Thus, it will be appreciated that a request (orcall) to execute or start a child task may originate from many differentsources, such as: the parent task; another task; a client application towhich the parent task belongs; or another client application of thesystem.

By employing one or more aspects of the present invention, execution orprocessing of a parent task may be delayed and then have a chance tostart its child task. This may be more acceptable to an end user thansimply terminating the parent task (as may happen in conventionalsystems). Embodiments may thus help to ensure a transaction systemmaintains a capacity to serve other types of business applications.

If it is determined to suspend the parent task, an embodiment maydetermine an updated resource status of the system, and then determinewhether to resume the parent task based on the determined updatedresource status of the system. The process of checking if a task iseligible to start may therefore be repeatedly undertaken so as to keepchecking the status of the system's load. In this way, a parent taskmay, e.g., only be suspended until a time at which it is determined thatthe parent task may be resumed. An approach to identifying when asuspended task can be resumed may thus be provided by one or moreembodiments. For example, an embodiment may periodically determine anumber of tasks in the system so as to identify if and when the numberof tasks decreases below a predetermined amount and, upon identifyingthe number of tasks is below the predetermined amount, a suspendedparent task may be resumed (e.g., removed from a queue).

Further, if it is determined to resume the parent task, one or moreembodiments may repeat: determining a resource status of the system; anddetermining whether to suspend the parent task or start the asynchronouschild task based on the determined resource status of the system. Inthis way, a status of the system resource(s) may once again be checkedto determine if it is OK to resume the task and start the requestedchild task. This approach may enable different criteria to be used forthe processes of checking whether to resume a suspended task andchecking whether to suspend a task. Improved control and flexibility ofsuspending and resuming tasks may therefore be provided.

By way of example, the resource status of the system may include ameasure of at least one of: a number of tasks running in the system; anumber of child tasks running in the system; a maximum number of tasksthat is allowed to run in the system; available memory resources of thesystem; available computing resources of the system; a response time ofthe system; and a processing load of the system. Many types of systemresources, system details and/or system parameters may therefore be usedto assess whether to suspend a task (e.g., so as to prevent execution ofa child task). These may be used on their own or in combination witheach other. A high level of flexibility and detail may be provided byone or more aspects.

For instance, an embodiment may take into account of the current numberof tasks in the system, the maximum number of tasks allowed in thesystem, and the number of child tasks already in the system, to decidewhether to suspend the parent task or not. If it is determined that theparent task should be suspended, it may then be placed into a queue ofparent tasks. When the number of tasks in the system has decreased tobelow a predetermined level, the suspended parent task may then beresumed and the method may once again check if it is eligible to startits child task.

In an embodiment, the determining whether to suspend the parent task orstart the asynchronous child task based on the determined resourcestatus of the system may include: comparing the determined resourcestatus with a predetermined threshold, wherein the threshold is, e.g.,representative of a resource status at which the system is overloaded;and determining whether to suspend the parent task or start theasynchronous child task based on the result of the comparison. In thisway, a parent task may be controlled depending on whether or not systemresource criteria are met. For example, if it is determined to suspendthe parent task, an embodiment may include suspending the parent task byplacing the parent task in a queue.

Embodiments may overcome shortcomings of existing task control conceptswhich require manual intervention and/or exhibit long waiting/responsetimes.

Accordingly, there may be provided an approach which provides autonomiccontrol of a running/executing parent task according to availableresource(s) of a transaction system such that overall system performanceis improved (e.g., by avoiding excessive delays and/or adverse effectsthat would otherwise be caused by executing a child task withinsufficient available resource(s)).

Embodiments may also provide for reducing a number of executing tasks ina system, so as to facilitate controlled loading of a system (e.g., byavoiding overloading a system resource).

Embodiments may therefore provide for controlling asynchronous taskexecution in large or distributed transaction systems. Dynamic taskexecution control capabilities may therefore be provided by one or moreembodiments, and such capabilities may be based on a status or currentusage of one or more system resources.

Modifications and additional steps to a transaction system may also beprovided which may enhance the value and utility of the providedaspects.

Embodiments may be utilized in many different types of task processingenvironments. In order to provide a context for the description ofelements and functionality of the illustrative embodiments, FIGS. 1 and2 are provided hereafter as example environments in which aspects of theembodiments may be implemented. It should be appreciated that FIGS. 1and 2 are only examples and are not intended to assert or imply anylimitation with regard to the environments in which aspects orembodiments of the present invention may be implemented. Manymodifications to the depicted environments may be made without departingfrom the spirit and scope of aspects of the present invention.

FIG. 1 depicts a pictorial representation of an example distributedtransaction processing storage system in which aspects of theembodiments may be implemented. Distributed system 100 may include anetwork of computers in which aspects of the embodiments may beimplemented. The distributed system 100 contains at least one network102, which is the medium used to provide communication links betweenvarious devices and computers connected together within the distributeddata processing system 100. The network 102 may include connections,such as wire, wireless communication links, or fiber optic cables, asexamples.

In the depicted example, a first server 104 and a second server 106 areconnected to the network 102 along with a storage unit 108. In addition,clients 110, 112, and 114 are also connected to the network 102. Theclients 110, 112, and 114 may be, for example, personal computers,network computers, or the like. In the depicted example, the firstserver 104 provides data, such as boot files, operating system images,and applications to the clients 110, 112, and 114. Clients 110, 112, and114 are clients to the first server 104 in the depicted example. Thedistributed system 100 may include additional servers, clients, andother devices not shown.

In the depicted example, the distributed system 100 is the Internet withthe network 102 representing a worldwide collection of networks andgateways that use the Transmission Control Protocol/Internet Protocol(TCP/IP) suite of protocols to communicate with one another. At theheart of the Internet is a backbone of high-speed data communicationlines between major nodes or host computers, including thousands ofcommercial, governmental, educational and other computer systems thatroute data and messages. Of course, the distributed system 100 may alsobe implemented to include a number of different types of networks, suchas for example, an intranet, a local area network (LAN), a wide areanetwork (WAN), or the like. As stated above, FIG. 1 is intended as anexample, not as an architectural limitation for different embodiments ofthe present invention, and therefore, the particular elements shown inFIG. 1 should not be considered limiting with regard to the environmentsin which the illustrative embodiments of the present invention may beimplemented.

FIG. 2 is a block diagram of an example system 200 in which aspects ofthe embodiments may be implemented. The system 200 is an example of acomputer, such as client 110 in FIG. 1, in which computer usable code orinstructions implementing the processes for embodiments of the presentinvention may be located.

In the depicted example, the system 200 employs a hub architectureincluding a north bridge and memory controller hub (NB/MCH) 202 and asouth bridge and input/output (I/O) controller hub (SB/ICH) 204. Aprocessing unit 206, a main memory 208, and a graphics processor 210 areconnected to NB/MCH 202. The graphics processor 210 may be connected tothe NB/MCH 202 through an accelerated graphics port (AGP).

In the depicted example, a local area network (LAN) adapter 212 connectsto SB/ICH 204. An audio adapter 216, a keyboard and a mouse adapter 220,a modem 222, a read only memory (ROM) 224, a hard disk drive (HDD) 226,a CD-ROM drive 230, universal serial bus (USB) ports and othercommunication ports 232, and PCI/PCIe devices 234 connect to the SB/ICH204 through a first bus 238 and a second bus 240. PCI/PCIe devices mayinclude, for example, Ethernet adapters, add-in cards, and PC cards fornotebook computers. PCI uses a card bus controller, while PCIe does not.ROM 224 may be, for example, a flash basic input/output system (BIOS).

The HDD 226 and CD-ROM drive 230 connect to the SB/ICH 204 throughsecond bus 240. The HDD 226 and CD-ROM drive 230 may use, for example,an integrated drive electronics (IDE) or a serial advanced technologyattachment (SATA) interface. Super I/O (SIO) device 236 may be connectedto SB/ICH 204.

An operating system runs on the processing unit 206. The operatingsystem coordinates and provides control of various components within thesystem 200 in FIG. 2. As a client, the operating system may be acommercially available operating system. An object-oriented programmingsystem, such as the Java programming system, may run in conjunction withthe operating system and provides calls to the operating system fromJava programs or applications executing on system 200.

As a server, system 200 may be, for example, an IBM eServer System pcomputer system, running the Advanced Interactive Executive (AIX)operating system or the LINUX operating system. The system 200 may be asymmetric multiprocessor (SMP) system including a plurality ofprocessors in processing unit 206. Alternatively, a single processorsystem may be employed.

Instructions for the operating system, the programming system, andapplications or programs are located on storage devices, such as HDD226, and may be loaded into main memory 208 for execution by processingunit 206. Similarly, one or more message processing programs accordingto an embodiment may be adapted to be stored by the storage devicesand/or the main memory 208.

The processes for embodiments of the present invention may be performedby processing unit 206 using computer usable program code, which may belocated in a memory, such as, for example, main memory 208, ROM 224, orin one or more peripheral devices 226 and 230.

A bus system, such as first bus 238 or second bus 240 as shown in FIG.2, may comprise one or more buses. The bus system may be implementedusing any type of communication fabric or architecture that provides fora transfer of data between different components or devices attached tothe fabric or architecture. A communication unit, such as the modem 222or the network adapter 212 of FIG. 2, may include one or more devicesused to transmit and receive data. A memory may be, for example, mainmemory 208, ROM 224, or a cache, such as found in NB/MCH 202 in FIG. 2.

Those of ordinary skill in the art will appreciate that the hardware inFIGS. 1 and 2 may vary depending on the implementation. Other internalhardware or peripheral devices, such as flash memory, equivalentnon-volatile memory, or optical disk drives and the like, may be used inaddition to or in place of the hardware depicted in FIGS. 1 and 2. Also,the processes of one or more embodiments may be applied to amultiprocessor data processing system, other than the system mentionedpreviously, without departing from the spirit and scope of aspects ofthe present invention.

Moreover, the system 200 may take the form of any of a number ofdifferent data processing systems including client computing devices,server computing devices, a tablet computer, laptop computer, telephoneor other communication device, a personal digital assistant (PDA), orthe like. In some examples, the system 200 may be a portable computingdevice that is configured with flash memory to provide non-volatilememory for storing operating system files and/or user-generated data,for example. Thus, the system 200 may essentially be any known orlater-developed data processing system without architectural limitation.

One or more aspects may enhance control of parent and child tasks in asystem. By making control of tasks based on a status of one or moreresources or operational properties of the system, embodiments mayfacilitate an asynchronous task start in a large transaction system, forexample. Such control need not require the intervention of a systemadministrator. Aspects may therefore extend or improve the task controlcapabilities and/or resource utilization of a transaction system.

Referring now to FIG. 3, there is depicted a simplified block diagram ofa control system 300 according to an embodiment.

In one example, the control system 300 is for controlling asynchronoustasks in a transaction system. In particular, the control system 300 maybe adapted to control tasks by controlling the execution of one or moreparent tasks running in the transaction system (not shown in FIG. 3).Such control may, for instance, be achieved by suspending a parent taskdepending on a status of one or more resources of the transactionsystem. By suspending a parent task, a child task of the parent task maybe prevented from running, for example.

Accordingly, it will be understood that an asynchronous child task(e.g., a task associated with a parent task such that it has aparent-child relationship with the parent task) may be controlled sothat its execution only occurs when the status of the transactionsystem's resource(s) meets a predetermined requirement (e.g., when anumber of tasks running in the transaction system is below apredetermined number).

In the example of FIG. 3, the control system 300 includes an interface310 adapted to obtain a request 305 to start an asynchronous child task.By way of example, a parent task may be a task of a client applicationthat is executed by a transaction system, and the child task may bestarted by any of: the parent task; another task of the clientapplication; and another client application, for example. Thus, it willbe appreciated that a request (or call) 305 to start a child task mayoriginate from many different sources, such as: the parent task; anothertask; a client application to which the parent task belongs; or anotherclient application of the system, as examples. The interface 310 maythus be adapted to receive a request (or call) 305 to start a child taskvia one or more suitable communication links/protocols (e.g., dependingon the expected origin(s) of such requests).

The control system 300 also includes a resource analysis component 320adapted to determine a resource status of the transaction system. By wayof example, a resource status of the transaction system may include ameasure of at least one of: a number of tasks running in the system; anumber of child tasks running in the system; a maximum number of tasksthat is allowed to run in the system; available memory resources of thesystem; available computing resources of the system; a response time ofthe system; and a processing load of the system. Put another way, aresource status may be adapted to represent a current status or value ofone or more operating parameters, characteristics, features orconstraints of the transaction system that may influence the executionof a task and/or the performance of the transaction system. For thispurpose, the resource analysis component 320 may communicate with amonitoring component 340 that is adapted to measure and/or monitor oneor more values of transaction system resource(s).

For the avoidance of doubt, it will be appreciated that the monitoringcomponent 340 may be provided separately from the control system 300(e.g., as part of the transaction system). However, in otherembodiments, the control system 300 may include the monitoring component340 (e.g., as part of the resource analysis component 320).

The control system 300 further includes an analysis component 330adapted to determine whether to suspend an existing parent taskassociated with the child task or to start the asynchronous child taskbased on the determined resource status of the system. For example, inthe embodiment of FIG. 3, the analysis component 330 is adapted to:compare the determined resource status with a predetermined threshold,wherein the threshold is representative of a resource status at whichthe system is overloaded; and to determine whether to suspend the parenttask or start the asynchronous child task based on the result of thecomparison. If the analysis component 330 determines to suspend theparent task, the control system 300 suspends the parent task by placingthe parent task in a queue.

Also, where the analysis component 330 determines to suspend the parenttask, the analysis component 330 is adapted to determine an updatedresource status of the system (e.g., by requesting an update resourcestatus from the resource analysis component 320) and to then determinewhether to resume the parent task based on the determined updatedresource status of the system. Then, if it is determined to resume theparent task, the control system 300 controls the resource analysiscomponent 320 to determine an updated (e.g., current or up-to-date)resource status of the transaction system, and controls the analysiscomponent 330 to determine whether to suspend the parent task or startthe asynchronous child task based on the updated resource status of thetransaction system.

From the description provided above, it will be understood that one ormore embodiments may provide an autonomic control capability thatreduces (or even eliminates) the intervention of a system administrator.By way of example, such embodiments may address the specific issue ofcontrolling the execution of a child task when a parent task is alreadyrunning in a transaction processing system. Thus, an autonomic controlmethod to control the parent task so it only starts the child task whenthe system is not overloaded may be provided. If the system isoverloaded, embodiments may suspend the parent task, queue it and thenresume it when the system's load is decreased to a certain (e.g.,predetermined satisfactory load) level.

Example embodiments may take into account: a current number of tasks inthe system; a maximum number of tasks allowed in the system; and anumber of child tasks already in the system, in order to decide whetherto suspend the parent task or not. If it is decided that the parent taskshould be suspended, the parent task may be placed in a queue (e.g.,ordered store) of parent tasks. Then, when the number of tasks in thesystem has decreased to below a threshold value, the suspended parenttask will be resumed and it may be once again checked if it is eligibleto start its child task. With this approach, a parent task may bedelayed and get a chance to start its child task. This may be moreacceptable to an end user than simply terminating the parent task. Inthis way, the system may maintain an available capacity to serve othertypes of business applications.

Referring now to FIG. 4, there is depicted one example a flow diagram ofa method according to an embodiment, in which the method determineswhether to suspend a parent task or allow it to start its asynchronouschild task.

The method begins in step 400, in which a request to start a child taskis received.

The method then proceeds to step 410, in which a resource status of thesystem is determined and checked against a predetermined thresholdresource status value. More specifically, in the example embodiment ofFIG. 4, the resource status includes a value of the total number oftasks running in the system, and step 410 includes checking if the totalnumber of tasks running in the system is greater than, e.g., 100% of apredetermined maximum number MAX of tasks.

If, in step 410, it is determined that the total number of tasks runningin the system is not greater than (i.e., is less than), e.g., 100% ofthe predetermined maximum number MAX of tasks, the method proceeds tostep 420 in which the asynchronous child task is started (e.g., executedor run). Conversely, if, in step 410, it is determined that the totalnumber of tasks running in the system is greater than, e.g., 100% of thepredetermined maximum number MAX of tasks, the method proceeds to step430 which includes checking if the total number of tasks running in thesystem is greater than, e.g., 110% of the predetermined maximum numberMAX of tasks.

If, in step 430, it is determined that the total number of tasks runningin the system is greater than, e.g., 110% of the predetermined maximumnumber MAX of tasks, the method proceeds to step 440 in which the parenttask is suspended and placed in a queue. This may enable the system tohave a chance to finish the existing tasks so the load (e.g., number oftasks) of the system may decrease to a number lower than the maximumnumber MAX of tasks.

Conversely, if, in step 430, it is determined that the total number oftasks running in the system is not greater than (i.e., is less than),e.g., 110% of the predetermined maximum number MAX of tasks, the methodproceeds to step 450 in which the total number of asynchronous childtasks in the system is determined and compared against, e.g., 80% of amaximum number MAX of tasks.

If, in step 450, it is determined that the total number of asynchronouschild tasks in the system is greater than, e.g., 80% of thepredetermined maximum number MAX of tasks, the method proceeds to step440 in which the parent task is suspended and placed in a queue. Again,this may enable the system to have a chance to finish the existing tasksso the load (e.g., number of tasks) of the system may decrease to anumber lower than the maximum number of tasks.

Conversely, if, in step 450, it is determined that the total number ofasynchronous child tasks in the system is not greater than (i.e., lessthan), e.g., 80% of the predetermined maximum number MAX of tasks, themethod proceeds to step 420 in which the asynchronous child task isstarted (e.g., executed or run). This can give the asynchronous child achance to finish, which in turn, allows the parent task to get theresponse back from its child task, then complete.

It will be appreciated that the values detailed in the example of FIG. 4may be different in alternative embodiments, For example, the figure of80% may be raised to a higher value, such as 90%, so that a system whichhas only asynchronous types of applications can make more use of thecapacity. Also, rather than the resource status comprising informationrelating to the total number of tasks running in the system, theresource status may relate to one or more other system resources inother embodiments (such as memory utilization, processor utilization,storage space, etc.) Other possibilities also exist.

Referring now to FIG. 5, there is depicted an example of a flow diagramof a process of resuming suspended tasks that may be employed in amethod according to an embodiment. Such a process may be employed todecide when and how many parent tasks to resume.

When, in step 500, the system starts running less than, e.g., 100% ofthe maximum number of tasks, the method proceeds to 510 in which it isdetermined whether or not the task queue is populated.

If the task queue is not populated (e.g., there are no suspended parenttasks), the method proceeds to step 515 in which the process ends.Conversely, if in step 510 it is determined that the task queue ispopulated (e.g., there are one or more suspended parent tasks), themethod proceeds to step 520 in which the suspended parent tasks areconditionally resumed. More specifically, in the example of FIG. 5, step520 includes resuming the suspended parent tasks in the queue up to,e.g., a maximum 15% of the maximum number of tasks plus a gap/differencebetween the (current) load of the system at that time and the maximumnumber of tasks. Upon resumption, the method depicted in FIG. 4 (anddescribed above) may be undertaken once again to check whether theresumed task is eligible to start its child task. Put another way, if itis determined to resume a parent task, embodiment may repeat the stepsof: determining a resource status of the system; and determining whetherto suspend the parent task or start the asynchronous child task based onthe determined resource status of the system.

In some embodiments, there may be provided a system comprising aprocessing arrangement adapted to carry out any method previouslydescribed with reference to FIGS. 1 to 5.

By way of example, as illustrated in FIG. 6, embodiments may include acomputer system 70, which may form part of a networked system 7. Thecomponents of computer system/server 70 may include, but are not limitedto, one or more processing arrangements, for example comprisingprocessors or processing units 71, a system memory 74, and a bus 90 thatcouples various system components including system memory 74 toprocessing unit 71.

Bus 90 represents one or more of any of several types of bus structures,including a memory bus or memory controller, a peripheral bus, anaccelerated graphics port, and a processor or local bus using any of avariety of bus architectures. By way of example, and not limitation,such architectures include Industry Standard Architecture (ISA) bus,Micro Channel Architecture (MCA) bus, Enhanced ISA (EISA) bus, VideoElectronics Standards Association (VESA) local bus, and PeripheralComponent Interconnect (PCI) bus.

Computer system/server 70 typically includes a variety of computersystem readable media. Such media may be any available media that isaccessible by computer system/server 70, and it includes both volatileand non-volatile media, removable and non-removable media.

System memory 74 can include computer system readable media in the formof volatile memory, such as random access memory (RAM) 75 and/or cachememory 76. Computer system/server 70 may further include otherremovable/non-removable, volatile/non-volatile computer system storagemedia. By way of example only, storage system 74 can be provided forreading from and writing to a non-removable, non-volatile magnetic media(not shown and typically called a “hard drive”). Although not shown, amagnetic disk drive for reading from and writing to a removable,non-volatile magnetic disk (e.g., a “floppy disk”), and an optical diskdrive for reading from or writing to a removable, non-volatile opticaldisk such as a CD-ROM, DVD-ROM or other optical media can be provided.In such instances, each can be connected to bus 90 by one or more datamedia interfaces. As will be further depicted and described below,memory 74 may include at least one program product having a set (e.g.,at least one) of program modules that are configured to carry out thefunctions of embodiments of the invention.

Program/utility 78, having a set (at least one) of program modules 79,may be stored in memory 74 by way of example, and not limitation, aswell as an operating system, one or more application programs, otherprogram modules, and program data. Each of the operating system, one ormore application programs, other program modules, and program data orsome combination thereof, may include an implementation of a networkingenvironment. Program modules 79 generally carry out the functions and/ormethodologies of embodiments of the invention as described herein.

Computer system/server 70 may also communicate with one or more externaldevices 80 such as a keyboard, a pointing device, a display 85, etc.;one or more devices that enable a user to interact with computersystem/server 70; and/or any devices (e.g., network card, modem, etc.)that enable computer system/server 70 to communicate with one or moreother computing devices. Such communication can occur via Input/Output(I/O) interfaces 72. Still yet, computer system/server 70 cancommunicate with one or more networks such as a local area network(LAN), a general wide area network (WAN), and/or a public network (e.g.,the Internet) via network adapter 73. As depicted, network adapter 73communicates with the other components of computer system/server 70 viabus 90. It should be understood that although not shown, other hardwareand/or software components could be used in conjunction with computersystem/server 70. Examples, include, but are not limited to: microcode,device drivers, redundant processing units, external disk drive arrays,RAID systems, tape drives, and data archival storage systems, etc.

In the context of the present application, where embodiments of thepresent invention constitute a method, it should be understood that sucha method is a process for execution by a computer, i.e., is acomputer-implementable method. The various steps of the method maytherefore reflect various parts of a computer program, e.g. variousparts of one or more algorithms.

As described herein, one or more aspects of the present invention seekto provide a method of controlling asynchronous tasks in a transactionsystem.

Further, one or more aspects seek to provide a computer program productincluding computer program code for implementing the method whenexecuted on a processor of a data processing system.

Yet further, one or more aspects seek to provide a system adapted toexecute this computer program code.

Also, one or more aspects seek to provide a control system forcontrolling asynchronous tasks in a transaction system.

According to an embodiment of the present invention there is provided acomputer-implemented method for controlling asynchronous tasks in atransaction system. The method includes obtaining a request to start anasynchronous child task. The method also includes determining a resourcestatus of the system. The method further includes determining whether tosuspend an existing parent task associated with the child task or tostart the asynchronous child task based on the determined resourcestatus of the system.

According to another embodiment of the present invention, there isprovided a computer program product for controlling asynchronous tasksin a transaction system. The computer program product comprises acomputer readable storage medium having program instructions embodiedtherewith, the program instructions executable by a processing unit tocause the processing unit to perform a method according to an embodimentof the invention.

According to another aspect of the invention, there is provided a systemcomprising at least one processor and the computer program productaccording to an embodiment. The at least one processor is adapted toexecute the computer program code of the computer program product.

According to yet another aspect of the invention, there is provided acontrol system for controlling asynchronous tasks in a transactionsystem. The control system includes an interface adapted to obtain arequest to start an asynchronous child task. The control system alsoincludes a resource analysis component adapted to determine a resourcestatus of the system. The system further includes an analysis componentadapted to determine whether to suspend an existing parent taskassociated with the child task or to start the asynchronous child taskbased on the determined resource status of the system.

The present invention may be a system, a method, and/or a computerprogram product at any possible technical detail level of integration.The computer program product may include a computer readable storagemedium (or media) having computer readable program instructions thereonfor causing a processor to carry out aspects of the present invention.

The computer readable storage medium can be a tangible device that canretain and store instructions for use by an instruction executiondevice. The computer readable storage medium may be, for example, but isnot limited to, an electronic storage device, a magnetic storage device,an optical storage device, an electromagnetic storage device, asemiconductor storage device, or any suitable combination of theforegoing. A non-exhaustive list of more specific examples of thecomputer readable storage medium includes the following: a portablecomputer diskette, a hard disk, a random access memory (RAM), aread-only memory (ROM), an erasable programmable read-only memory (EPROMor Flash memory), a static random access memory (SRAM), a portablecompact disc read-only memory (CD-ROM), a digital versatile disk (DVD),a memory stick, a floppy disk, a mechanically encoded device such aspunch-cards or raised structures in a groove having instructionsrecorded thereon, and any suitable combination of the foregoing. Acomputer readable storage medium, as used herein, is not to be construedas being transitory signals per se, such as radio waves or other freelypropagating electromagnetic waves, electromagnetic waves propagatingthrough a waveguide or other transmission media (e.g., light pulsespassing through a fiber-optic cable), or electrical signals transmittedthrough a wire.

Computer readable program instructions described herein can bedownloaded to respective computing/processing devices from a computerreadable storage medium or to an external computer or external storagedevice via a network, for example, the Internet, a local area network, awide area network and/or a wireless network. The network may comprisecopper transmission cables, optical transmission fibers, wirelesstransmission, routers, firewalls, switches, gateway computers and/oredge servers. A network adapter card or network interface in eachcomputing/processing device receives computer readable programinstructions from the network and forwards the computer readable programinstructions for storage in a computer readable storage medium withinthe respective computing/processing device.

Computer readable program instructions for carrying out operations ofthe present invention may be assembler instructions,instruction-set-architecture (ISA) instructions, machine instructions,machine dependent instructions, microcode, firmware instructions,state-setting data, configuration data for integrated circuitry, oreither source code or object code written in any combination of one ormore programming languages, including an object oriented programminglanguage such as Smalltalk, C++, or the like, and procedural programminglanguages, such as the “C” programming language or similar programminglanguages. The computer readable program instructions may executeentirely on the user's computer, partly on the user's computer, as astand-alone software package, partly on the user's computer and partlyon a remote computer or entirely on the remote computer or server. Inthe latter scenario, the remote computer may be connected to the user'scomputer through any type of network, including a local area network(LAN) or a wide area network (WAN), or the connection may be made to anexternal computer (for example, through the Internet using an InternetService Provider). In some embodiments, electronic circuitry including,for example, programmable logic circuitry, field-programmable gatearrays (FPGA), or programmable logic arrays (PLA) may execute thecomputer readable program instructions by utilizing state information ofthe computer readable program instructions to personalize the electroniccircuitry, in order to perform aspects of the present invention.

Aspects of the present invention are described herein with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems), and computer program products according to embodiments of theinvention. It will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer readable program instructions.

These computer readable program instructions may be provided to aprocessor of a general purpose computer, special purpose computer, orother programmable data processing apparatus to produce a machine, suchthat the instructions, which execute via the processor of the computeror other programmable data processing apparatus, create means forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks. These computer readable program instructionsmay also be stored in a computer readable storage medium that can directa computer, a programmable data processing apparatus, and/or otherdevices to function in a particular manner, such that the computerreadable storage medium having instructions stored therein comprises anarticle of manufacture including instructions which implement aspects ofthe function/act specified in the flowchart and/or block diagram blockor blocks.

The computer readable program instructions may also be loaded onto acomputer, other programmable data processing apparatus, or other deviceto cause a series of operational steps to be performed on the computer,other programmable apparatus or other device to produce a computerimplemented process, such that the instructions which execute on thecomputer, other programmable apparatus, or other device implement thefunctions/acts specified in the flowchart and/or block diagram block orblocks.

The flowchart and block diagrams in the figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods, and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof instructions, which comprises one or more executable instructions forimplementing the specified logical function(s). In some alternativeimplementations, the functions noted in the block may occur out of theorder noted in the figures. For example, two blocks shown in successionmay, in fact, be executed substantially concurrently, or the blocks maysometimes be executed in the reverse order, depending upon thefunctionality involved. It will also be noted that each block of theblock diagrams and/or flowchart illustration, and combinations of blocksin the block diagrams and/or flowchart illustration, can be implementedby special purpose hardware-based systems that perform the specifiedfunctions or acts or carry out combinations of special purpose hardwareand computer instructions.

The descriptions of the various embodiments of the present inventionhave been presented for purposes of illustration, but are not intendedto be exhaustive or limited to the embodiments disclosed. Manymodifications and variations will be apparent to those of ordinary skillin the art without departing from the scope and spirit of the describedembodiments. The terminology used herein was chosen to best explain theprinciples of the embodiments, the practical application or technicalimprovement over technologies found in the marketplace, or to enableothers of ordinary skill in the art to understand the embodimentsdisclosed herein.

What is claimed is:
 1. A computer-implemented method of controllingasynchronous tasks in a system, the computer-implemented methodcomprising: automatically controlling execution of asynchronous tasks inthe system, the automatically controlling comprising: obtaining arequest to start within the system an asynchronous child task associatedwith a parent task executing within the system; based on obtaining therequest to start the asynchronous child task, determining whether tosuspend the parent task or to start the asynchronous child task, thedetermining comprising comparing a resource status of the system to apredetermined threshold, the predetermined threshold being an upper loadlevel representative of a resource status of the system at which thesystem is overloaded; based on determining that the resource status ofthe system is above the predetermined threshold, suspending execution ofthe parent task associated with the asynchronous child task before thesystem starts executing the asynchronous child task, wherein thesuspending execution of the parent task also prevents execution of theasynchronous child task; requesting at least one updated resource statusof the system; based on receiving the at least one updated resourcestatus, determining that the resource status of the system has decreasedbelow the predetermined threshold to a predefined load level below theupper load level, the predefined load level being a defined percentagelevel below the upper load level; based on determining that the resourcestatus of the system has decreased to the predefined load level belowthe upper load level, resuming execution of the parent task; based onthe resuming, repeating the determining whether to suspend the parenttask or to start the asynchronous child task; and based on determiningthat the resource status of the system is below the predeterminedthreshold, starting execution of the asynchronous child task withoutsuspending the parent task executing within the system.
 2. Thecomputer-implemented method of claim 1, wherein the resource status ofthe system comprises a measure of at least one of the following: anumber of tasks running in the system, a maximum number of tasks thatare allowed to run in the system, available memory resources of thesystem, available computing resources of the system, a response time ofthe system, and a processing load of the system.
 3. Thecomputer-implemented method of claim 1, wherein the suspending placesthe parent task in a queue of one or more suspended tasks.
 4. Thecomputer-implemented method of claim 1, wherein the system is adistributed transaction system, and the request to start theasynchronous child task is provided by a client application executed bythe distributed transaction system.
 5. The computer-implemented methodof claim 1, wherein the resource status of the system comprises ameasure of a number of child tasks running in the system.
 6. Thecomputer-implemented method of claim 1, wherein the resource status ofthe system comprises a maximum number of tasks allowed to run in thesystem.
 7. The computer-implemented method of claim 1, wherein theresource status of the system comprises a response time of the system.8. The computer-implemented method of claim 1, wherein the request tostart the asynchronous child task originates from the parent task. 9.The computer-implemented method of claim 1, wherein the request to startthe asynchronous child task originates from another task of anapplication to which the parent task belongs.
 10. Thecomputer-implemented method of claim 1, wherein the request to start theasynchronous child task originates from a client application to whichthe parent task does not belong.